import pandas as pd
import csv
import seaborn as sns
sns.set_palette('husl')
import matplotlib.pyplot as plt
%matplotlib inline
%pylab inline
import warnings
warnings.filterwarnings("ignore")
df = pd.read_excel("SPYVIX.xlsx", sheet_name = "SPY")
#df1 = pd.read_excel("SPYVIX.xlsx", sheet_name = "VIX")
df.info()
df.head()
df.tail()
df = df[:-1]
df.tail()
import plotly.express as px
import plotly.graph_objects as go
fig = go.Figure() # go object
Date = df["Date"]
Long = df["Money Compounded (Prev. Close to Next Open)"]
Medium = df["Money Compounded (Same Close to Same Open)"]
Short = df["Money Compounded (Prev Close to Next Close)"]
fig.add_trace(go.Scatter(x=Date, y=Long, name='Money Compounded (Prev. Close to Next Open)',
line=dict(color='firebrick', width=3)))
fig.add_trace(go.Scatter(x=Date, y=Medium, name='Money Compounded (Same Close to Same Open)',
line=dict(color='royalblue', width=3,)))
fig.add_trace(go.Scatter(x=Date, y=Short, name='Money Compounded (Prev Close to Next Close)',
line=dict(color='green', width=3,)))
# Edit the layout
fig.update_layout(title='Growth of $100 Compounded with Different Naive Methods SPY',
xaxis_title='Year',
yaxis_title='USD Compounded', width=1000, height=800,)
fig.show()
#fig = go.Figure() # go object
#Date = df1["Date"]
#Long = df1["Money Compounded (Prev. Close to Next Open)"]
#Medium = df1["Money Compounded (Same Close to Same Open)"]
#Short = df1["Money Compounded (Prev Close to Next Close)"]
#fig.add_trace(go.Scatter(x=Date, y=Long, name='Money Compounded (Prev. Close to Next Open)',
# line=dict(color='firebrick', width=3)))
#fig.add_trace(go.Scatter(x=Date, y=Medium, name='Money Compounded (Same Close to Same Open)',
#line=dict(color='royalblue', width=3,)))
#fig.add_trace(go.Scatter(x=Date, y=Short, name='Money Compounded (Prev Close to Next Close)',
# line=dict(color='green', width=3,)))
# Edit the layout
#fig.update_layout(title='Growth of $100 Compounded with Different Naive Methods VIX',
# xaxis_title='Year',
# yaxis_title='USD Compounded', width=1000, height=800,)
#fig.show()